package com.kmust.dream.wanderingdream.donation.service.impl;

import com.kmust.dream.wanderingdream.comm.utils.PageUtils;
import com.kmust.dream.wanderingdream.comm.utils.Query;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kmust.dream.wanderingdream.donation.dao.AuditDonationPublicDao;
import com.kmust.dream.wanderingdream.donation.entity.AuditDonationPublicEntity;
import com.kmust.dream.wanderingdream.donation.service.AuditDonationPublicService;
@Deprecated
@Service("auditDonationPublicService")
public class AuditDonationPublicServiceImpl extends ServiceImpl<AuditDonationPublicDao, AuditDonationPublicEntity> implements AuditDonationPublicService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<AuditDonationPublicEntity> page = this.page(
                new Query<AuditDonationPublicEntity>().getPage(params),
                new QueryWrapper<AuditDonationPublicEntity>()
        );
        page.setSize(3);//设置每页记录数
        long pages = page.getRecords().size();//得到总记录数
        page.setPages(pages);//设置一共分了几页(传入后自动计算)
        page.setTotal(pages);//设置总记录数

        return new PageUtils(page);
    }


}